自适应固定定位
mounted() {
    //监听滚动条
    window.addEventListener('scroll', this.throttle(this.removeFixed, 100))
    offsetTop = this.$refs.pay.offsetTop
    if (document.documentElement.scrollTop + window.innerHeight >= offsetTop) {
        this.$refs.pay.style.position = 'relative'
    } else {
        this.$refs.pay.style.position = 'fixed'
        this.$refs.pay.style.bottom = '0'
    }
},
destroyed() {
    //销毁监听
    window.removeEventListener("scroll", this.removeFixed);
},
methods: {
    //节流函数
    throttle(fn, delay) {
        let timer = null
        return function () {
            if (timer) {
                return
            }
            timer = setTimeout(() => {
                fn()
                timer = null
            }, delay)
        }
    },
    // 移除固定定位
    removeFixed() {
        if (document.documentElement.scrollTop + window.innerHeight >= offsetTop) {
            this.$refs.pay.style.position = 'relative'
        } else {
            this.$refs.pay.style.position = 'fixed'
            this.$refs.pay.style.bottom = '0'
        }
    },
}